package br.com.sgdc.view.util;

import java.io.File;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.GregorianCalendar;

public class DateUtils {

	public static String getDataAtual() {
		GregorianCalendar calendar = new GregorianCalendar();
		DateFormat formato = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss");
		String dataAtual = formato.format(calendar.getTime());

		return dataAtual;
	}
	
	public static String getDateFile(File file) {
		DateFormat formato = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss");
		String dataAtual = formato.format(new Date(file.lastModified()));
		
		return dataAtual;
	}
}
